<?php
/**
 * FileName: SettingService.php
 * Author: Fei.Song
 * Date: 2021/4/28 11:15
 * Created by PhpStorm
 * Desc:
 */

namespace App\Service;

use App\Models\Admin\Setting;

class SettingService extends BaseService {

    public function getAllBySiteId($siteId=null){
        if(!$siteId){
            $data=(new Setting())->get(["id","name", "value"])->toArray();
        }else{
            $data=Setting::withoutGlobalScope('site_id_scope')->where('site_id','=',$siteId)->get(["id","name", "value"])->toArray();
        }
        return $data;
    }

    /**获取*/
}
